<!DOCTYPE html>
<html lang="en">
<head>
    <title id='Description'>TagCloud populate from array</title>
    <link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" />
    <script type="text/javascript" src="../../scripts/jquery-1.11.1.min.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxcore.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxdata.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxtagcloud.js"></script>
    <script type="text/javascript" src="../../scripts/demos.js"></script>
    <script>
        $(document).ready(function () {
            var data = [
                { countryName: "Australia", technologyRating: 35 },
                { countryName: "United States", technologyRating: 60 },
                { countryName: "Germany", technologyRating: 55 },
                { countryName: "Brasil", technologyRating: 20 },
                { countryName: "United Kingdom", technologyRating: 50 },
                { countryName: "Japan", technologyRating: 80 }
            ];
            var source =
            {
                localdata: data,
                datatype: "array",
                datafields: [
                    { name: 'countryName' },
                    { name: 'technologyRating' }
                ]
            };
            var dataAdapter = new $.jqx.dataAdapter(source, {});
            $('#tagCloud').jqxTagCloud({
                width: '600px',
                source: dataAdapter,
                displayMember: 'countryName',
                valueMember: 'technologyRating'
            });
        });
    </script>
</head>

<body>
    <div id="tagCloud"></div>
</body>
</html>
